import request from '@/utils/request'

export function getSteelJianZhengTable(page, pageSize, projectName, subprojectName) {
  return request({
    url: `/statementManage2/getSteelJianZhengTable?projectName=${projectName}&subprojectName=${subprojectName}&page=${page}&pageSize=${pageSize}`,
    method: 'GET'
  })
}

export function getSteelJianZhengPreview(subprojectId) {
  return request({
    url: `/statementManage2/getSteelJianZhengPreview?subprojectId=${subprojectId}`,
    method: 'GET'
  })
}

export function getSteelTable(page, pageSize, projectName, subprojectName) {
  return request({
    url: `/statementManage2/getSteelTable?projectName=${projectName}&subprojectName=${subprojectName}&page=${page}&pageSize=${pageSize}`,
    method: 'GET'
  })
}

export function getSteelPreview(subprojectId) {
  return request({
    url: `/statementManage2/getSteelPreview?subprojectId=${subprojectId}`,
    method: 'GET'
  })
}

export function getBaoShenPreview(subprojectId) {
  return request({
    url: `/statementManage2/getBaoShenPreview?subprojectId=${subprojectId}`,
    method: 'GET'
  })
}

export function getJCRecordPreview(subprojectId) {
  return request({
    url: `/statementManage2/getJCRecordPreview?subprojectId=${subprojectId}`,
    method: 'GET'
  })
}

// 导出钢筋材质台账
export function exportSteelLedgerByTemplate(subprojectId) {
  return request({
    url: `/statementManage2/exportSteelLedgerByTemplate?subprojectId=${subprojectId}`,
    method: 'get',
    responseType: 'blob'
  })
}

// 导出钢筋见证取样记录
export function exportSteelJianZhengByTemplate(subprojectId) {
  return request({
    url: `/statementManage2/exportSteelJianZhengByTemplate?subprojectId=${subprojectId}`,
    method: 'get',
    responseType: 'blob'
  })
}